import { createRouter, createWebHistory } from "vue-router";
import BasicLayout from "./layouts/BasicLayout.vue";
import { HomeOutlined, SettingOutlined } from "@ant-design/icons-vue";

export default createRouter({
  history: createWebHistory(),
  routes: [
    {
      path: "/",
      name: "index",
      meta: { title: "Home" },
      component: BasicLayout,
      redirect: "/welcome",
      children: [
        {
          path: "/welcome",
          name: "welcome",
          meta: { title: "首页", icon: <HomeOutlined /> },
          component: () => import("./views/Home.vue"),
        },
        {
          path: "/setting",
          name: "setting",
          meta: { title: "设置", icon: <SettingOutlined /> },
          component: () => import("./views/Setting.vue"),
        },
      ],
    },
  ],
});
